function isMirror(str1, str2) {
  const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  let str1New = "";
  for (const char of str1) {
    if (letters.includes(char)) {
      str1New += char;
    }
  }
  let str2New = "";
  for (const char of str2) {
    if (letters.includes(char)) {
      str2New += char;
    }
  }
  const str1NewReversed = str1New.split("").reverse().join("");
  if (str1NewReversed === str2New) {
    return true;
  } else {
    return false;
  }
}

// console.log("hello".split("").reverse().join(""));
console.log(isMirror("helloworld", "helloworld"));